<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>苹果<a href="http://www.baidu.com" class="one">删除</a></li>
        <li>小米<a href="#" class="one">删除</a></li>
        <li>华为<a href="#" class="one">删除</a></li>
    </ul>
    <script>
    var dels=document.getElementsByClassName("one");
    for(let i=0;i<dels.length;i++){
        dels[i].onclick=function(event){
            this.parentNode.style.display="none";
            event.preventdefault();/* 阻止跳转 */
            // return false;
        }
    }
    </script>
</body>
</html>